import { createStore } from 'vuex'
const TOKEN_KEY = "USER"
export default createStore({
    state:{
        form: JSON.parse(window.localStorage.getItem(TOKEN_KEY)),
    },
    mutations:{
        setform(state,data){
            state.form = data;
            window.localStorage.setItem(TOKEN_KEY,JSON.stringify(state.form));
        }
    },
    actions:{

    },
    modules:{

    },
    getters:{
        form(state){
            return state.form
        }
    }
})